package com.guodi.model.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel(value = "指标值")
public class ApiIndicatorsVal {
    @ApiModelProperty(value = "指标id")
    private String id;
    @Excel(name="单位",orderNum = "6",width = 30)
    @ApiModelProperty(value = "指标单位")
    private String unit;
    @Excel(name="指标名称",orderNum = "2",width = 30)
    @ApiModelProperty(value = "指标名称")
    private String name;
    @ApiModelProperty(value = "指标内涵")
    private String connotation;
    @Excel(name="监测值",orderNum = "3",width = 30)
    @ApiModelProperty(value = "监测值")
    private String monitorValue;
    @ApiModelProperty(value = "监测值环比")
    private Double monitorRatio;

    @ApiModelProperty(value = "监测年份")
    private String monitorYear;

    @ApiModelProperty(value = "监测时间")
    private String monitorTime;

    @ApiModelProperty(value = "上报值")
    private String value;
    @ApiModelProperty(value = "上报年份")
    private String year;
    @ApiModelProperty(value = "是否符合达标率（上报值对比目标值 ：1-达标，0-未达标）")
    private Integer isStandard;
    @ApiModelProperty(value = "是否符合统一率（上报值等于监测值：1-统一，0-未统一）")
    private Integer isUnify;
    @Excel(name="基期年份",orderNum = "4",width = 30)
    @ApiModelProperty(value = "基期年份")
    private String baseYear;
    @ApiModelProperty(value = "基期值")
    private String baseValue;
    @ApiModelProperty(value = "规划年份")
    private String targetYear;
    @Excel(name="规划目标值",orderNum = "5",width = 30)
    @ApiModelProperty(value = "规划值")
    private String targetValue;
    @ApiModelProperty(value = "行政区划编码")
    private String divisionCode;
    @ApiModelProperty(value = "行政区划名称")
    private String divisionName;
    @ApiModelProperty(value = "更新时间")
    private Date updateDate;

    @ApiModelProperty(value = "是否为新指标 1是 0否",hidden = true)
    @TableField(exist = false)
    private Integer isNew = 0;

    @ApiModelProperty(value = "上升  1是 0否",hidden = true)
    @TableField(exist = false)
    private Integer goUp = 0;

    @Excel(name="预警状态",orderNum = "7",width = 30)
    @ApiModelProperty(value = "预警状态")
    private String warnStatus;

    @ApiModelProperty(value = "预警规则")
    private String warnRule;

    @ApiModelProperty(value = "指标趋势（正向：positive，反向：reverse）")
    private String trend;

    @ApiModelProperty(value = "指标属性（constraint：约束性，expect：预期性）")
    private String attribute;

    @ApiModelProperty(value = "环比率")
    private Double ringRatio;

    @ApiModelProperty(value = "增长率")
    private Double growthRatio;

    @ApiModelProperty(value = "完成率")
    private Double completionRatio;

    @ApiModelProperty(value = "上级目录名称")
    @TableField(exist = false)
    @Excel(name="一级",orderNum = "1",width = 30)
    private String parentName;

    @ApiModelProperty(value = "指标说明(上报值)")
    private String reportExplain;

    @ApiModelProperty(value = "指标说明(规划值)")
    private String targetExplain;

    /**
     * 2020.11.07添加字段
     */
    @ApiModelProperty(value = "指标编号")
    private String code;

    @ApiModelProperty(value = "采集单位")
    private String gatherCompany;

    @ApiModelProperty(value = "责任单位")
    private String dutyCompany;

    @ApiModelProperty(value = "责任处室")
    private String dutyDepartment;

    @ApiModelProperty(value = "最终计算单位")
    private String calculateUnit;

    /**
     * 2021.1.6添加字段
     * 正向指标：监测值-规划值，反向指标：规划值-监测值
     */
    @ApiModelProperty(value = "差值")
    private Double differenceValue;

    /**
     * 2021.8.4
     * 指标预警配置(注意只针对3.2版本)
     */
    @ApiModelProperty(value = "指标预警配置(注意只针对3.2版本)")
    private String warnRuleConfig;

    @ApiModelProperty(value = "评估规则配置")
    private String estimateRuleConfig;

    @ApiModelProperty(value = "地区平均监测值")
    private String avgMonitorValue;

    @ApiModelProperty(value = "上一监测值，根据更新周期，如果是年度更新，就查指标监测值里面update_time为年度的上一条监测值，如果上一年没有，则往前继续追溯。如果是月度更新，就查指标监测值里面update_time为月度的上一条监测值")
    private String lastMonitorValue;

    @ApiModelProperty(value = "指标更新周期，year-年度，month-月度")
    private String updateCycle;

    @ApiModelProperty(value = "查询时间")
    private String queryTime;

    @ApiModelProperty(value = "查询年份")
    private String queryYear;

    @ApiModelProperty(value = "评估状态")
    private String estimateStatus;

}
